package com.trippartner.client.menu.event;

import com.google.gwt.event.shared.GwtEvent;

public class GlobalMenuEvent extends GwtEvent<GlobalMenuCommandHandler> {

	public static Type<GlobalMenuCommandHandler> TYPE = new Type<GlobalMenuCommandHandler>();

	private GlobalMenuCommandEnum globalMenuCommand = null;

	public GlobalMenuEvent(GlobalMenuCommandEnum globalMenuCommand) {
		super();
		this.globalMenuCommand = globalMenuCommand;
	}

	@Override
	public Type<GlobalMenuCommandHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(GlobalMenuCommandHandler handler) {
		handler.onGlobalMenuCommandAction(this);
	}

	public GlobalMenuCommandEnum getGlobalMenuCommand() {
		return globalMenuCommand;
	}

}
